#!/bin/bash
API=28
NDK_PATH=/Users/jimo/Library/Android/sdk/ndk/26.2.11394342
TOOLCHAIN_FILE=$NDK_PATH/build/cmake/android.toolchain.cmake
rm -rf build install
mkdir -p build install && cd build || exit
cmake .. \
    -DCMAKE_BUILD_TYPE=Release \
    -DCMAKE_INSTALL_PREFIX=/Users/jimo/PycharmProjects/brotli/install \
    -DCMAKE_TOOLCHAIN_FILE=$TOOLCHAIN_FILE \
    -DANDROID_ABI=arm64-v8a \
    -DBUILD_SHARED_LIBS=OFF \
    -DANDROID_NATIVE_API_LEVEL=$API \
    -DANDROID_STL=c++_static
cmake --build . --config Release --target install
